﻿<UserControl x:Class="EventLogAnalyzer.View.LogDistributionListControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:View="clr-namespace:EventLogAnalyzer.View" xmlns:Converter="clr-namespace:EventLogAnalyzer.View.Converter" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Converter:BoolToOpacityConverter x:Key="boolToOpacityConverter"/>
        <Converter:OrderToYTranslateConverter x:Key="orderToYTranslateConverter" />
    </UserControl.Resources>
    <Grid>
            <ItemsControl ItemsSource="{Binding Path=LogDistributionViewModel}" >
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border>
                            <View:LogDistributionControl Opacity="{Binding Path=IsInFocus, Converter={StaticResource boolToOpacityConverter}}">
                                <View:LogDistributionControl.RenderTransform>
                                    <TranslateTransform Y="{Binding Path=Order, Converter={StaticResource orderToYTranslateConverter}}" />
                                </View:LogDistributionControl.RenderTransform>
                            </View:LogDistributionControl>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <Grid />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>

    </Grid>
</UserControl>
